Resolving the issue where Claude Code on desktop cannot resume chat sessions
TLDR
- When the OAuth token expires, Claude Code encounters a 401 error, and the
/logincommand fails. - This is a known bug in the Claude Desktop Preview version, affecting both Windows and macOS users.
- The temporary workaround is to re-run the installer (Setup.exe), which restores functionality without losing your chat session.
- It is recommended to keep an eye on the official GitHub Issues for a formal fix.
Symptoms and Conditions
When does this issue occur: When the OAuth authentication state of Claude Desktop expires due to inactivity, the system triggers an authentication error.
When the user attempts to execute a command, they receive the following API error message:
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CWWoXen3mpmsjy27LGmqn"} · Please run /loginAt this point, if you follow the error prompt and execute the /login command, the following abnormal behavior occurs:
- There is no visual feedback when the command is first entered.
- After a delay, the system reports
Unknown slash command: login.
This issue prevents the current chat session from continuing. It has been confirmed as a known bug in Claude Desktop (Windows/macOS). For related discussions, please refer to:
- GitHub Issue #13928: Claude Code for Windows unusable due to OAuth loop
- GitHub Issue #15007: /login Does Not Recover Active Session
Temporary Workaround
When to use this solution: When the aforementioned OAuth expiration issue occurs and the /login command does not work as expected.
WARNING
The following is an unofficial temporary workaround. It is recommended to keep an eye on official updates and wait for a formal fix.
Before the official fix for the authentication reconnection mechanism is released, you can restore operations by following these steps:
- Manually close the Claude Desktop window (it is recommended to close it manually to avoid interference from residual processes).
- Re-run
Claude Setup.exe.
After performing the steps above, your chat session will immediately resume, and there is no need to log in again or create a new chat session. This method is only intended as a stopgap measure until an official fix is released.
Changelog
- 2025-12-27 Initial version created.
